package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CwArticlesMapper;
import com.ruoyi.system.domain.CwArticles;
import com.ruoyi.system.service.ICwArticlesService;

/**
 * 文章管理Service业务层处理
 * 
 * @author hyx
 * @date 2025-03-08
 */
@Service
public class CwArticlesServiceImpl implements ICwArticlesService 
{
    @Autowired
    private CwArticlesMapper cwArticlesMapper;

    /**
     * 查询文章管理
     * 
     * @param articleId 文章管理主键
     * @return 文章管理
     */
    @Override
    public CwArticles selectCwArticlesByArticleId(Long articleId)
    {
        return cwArticlesMapper.selectCwArticlesByArticleId(articleId);
    }

    /**
     * 查询文章管理列表
     * 
     * @param cwArticles 文章管理
     * @return 文章管理
     */
    @Override
    public List<CwArticles> selectCwArticlesList(CwArticles cwArticles)
    {
        return cwArticlesMapper.selectCwArticlesList(cwArticles);
    }

    /**
     * 新增文章管理
     * 
     * @param cwArticles 文章管理
     * @return 结果
     */
    @Override
    public int insertCwArticles(CwArticles cwArticles)
    {
        return cwArticlesMapper.insertCwArticles(cwArticles);
    }

    /**
     * 修改文章管理
     * 
     * @param cwArticles 文章管理
     * @return 结果
     */
    @Override
    public int updateCwArticles(CwArticles cwArticles)
    {
        return cwArticlesMapper.updateCwArticles(cwArticles);
    }

    /**
     * 批量删除文章管理
     * 
     * @param articleIds 需要删除的文章管理主键
     * @return 结果
     */
    @Override
    public int deleteCwArticlesByArticleIds(Long[] articleIds)
    {
        return cwArticlesMapper.deleteCwArticlesByArticleIds(articleIds);
    }

    /**
     * 删除文章管理信息
     * 
     * @param articleId 文章管理主键
     * @return 结果
     */
    @Override
    public int deleteCwArticlesByArticleId(Long articleId)
    {
        return cwArticlesMapper.deleteCwArticlesByArticleId(articleId);
    }
}
